package com.ssy.lingxi.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.dto.request.InvoiceMessageListRequest;
import com.ssy.lingxi.dto.request.InvoiceProveGetVO;
import com.ssy.lingxi.dto.response.InvoiceMessageResponse;
import com.ssy.lingxi.dto.response.InvoiceProveVO;
import com.ssy.lingxi.fallback.CorporateAccountConfigControllerFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

@FeignClient(value = "settle-accounts-service", fallback = CorporateAccountConfigControllerFallback.class)
public interface InvoiceMessageControllerFeigen {

    /**
    * 结算规则配置 发票信息详情查询
    * @author wrc
    * @date 2020/10/28
    */
    @GetMapping("/settle/accounts/invoice/message/details/inside")
    Wrapper<InvoiceMessageResponse> invoiceMessageDetails(@RequestParam("id") Long id);

    /**
     * 根据会员角色ids,查询会员默认发票
     * @param memberList
     * @return
     */
    @PostMapping("/settle/accounts/invoice/message/member/list")
    Wrapper<List<InvoiceMessageResponse>> getMemberInvoiceMessageList(@RequestBody @Valid InvoiceMessageListRequest memberList);

    /**
    * 根据单据编号+结算类型，获取单据[发票凭证]信息列表
    * @author ds
    * @date 2021/4/12
    */
    @GetMapping("/settle/accounts/member/feign/getInvoiceProve")
    Wrapper<List<InvoiceProveVO>> getInvoiceProve(@RequestBody @Valid InvoiceProveGetVO id);


}
